public class GameBoard {

  String              asets[][];
  final static String hit         = "|_Hit_|";
  final static String drillingRig = "|D_Rig|";
  final static String gasStation  = "|GasSt|";
  final static String refinery    = "|Refin|";
  final static String oilWell     = "|OilWe|";
  final static String empty       = "|__x__|";

  public GameBoard() {
    this.asets = new String[6][6];
    clearBoard();
  }

  public void clearBoard() {
    // this.asets = new String[6][6];
    for (int i = 0; i < 6; i++) {
      for (int j = 0; j < 6; j++) {
        this.asets[i][j] = empty;
        // System.out.print(" " + asets[i][j]);
      }
      // System.out.println("");
    }
  }

  public void printBoard() {
    // print reference on top of the grid
    // array[ROW] [COLUMN]
    StdOut.println("|_x_|__1__||__2__||__3__||__4__||__5__||__6__|");
    for (int i = 0; i < 6; i++) {
      StdOut.print("|_" + (i + 1) + "_");
      for (int j = 0; j < 6; j++) {
        StdOut.print(asets[i][j]);// print Strings
      }
      StdOut.println("");
    }
    // StdOut.println("|_x_|__1__|__2__|__3__|__4__|__5__|__6__|");
  }

  public void buyDrillingRig(int xRef, int yRef) {
    this.asets[xRef][yRef] = drillingRig;
  }

  public void buyGasStation(int xRef, int yRef) {
    this.asets[xRef][yRef] = gasStation;
  }

  public void buyRefinery(int xRef, int yRef) {
    this.asets[xRef][yRef] = refinery;
  }

  public void buyOilWell(int xRef, int yRef) {
    this.asets[xRef][yRef] = oilWell;
  }

  public void sellBuilding(int xRef, int yRef) {
    this.asets[xRef][yRef] = empty;
  }

  public void hit(int xRef, int yRef) {
    this.asets[xRef][yRef] = hit;
  }

}